CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

include_directories(${COMN_DIR}/include)
include_directories(${THIRD_PARTY}/Libevent/include)
include_directories(${THIRD_PARTY}/jsoncpp-0.10.6/include)
include_directories(${THIRD_PARTY}/udt4/src)

link_directories(${COMN_DIR}/lib)
link_directories(${THIRD_PARTY}/Libevent/lib)
link_directories(${PROJECT_ROOT}/lib)

if (MSVC)
    #warning 4251
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4819 /wd4996 ")

	set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:NOREF /OPT:ICF")
	SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
	
endif()

if(WIN32)
	#include_directories(${THIRD_PARTY}/stdint)
else()
endif()

aux_source_directory(. SOURCES)

add_library(MediaCaster SHARED ${SOURCES})

target_link_libraries(MediaCaster 
	${LIB_PLATFORM}
	debug comnd optimized comn
	event
	debug jsoncppd optimized jsoncpp
	debug udt4d optimized udt4
	)

set_target_properties(MediaCaster PROPERTIES LINK_INTERFACE_LIBRARIES "")
set_target_properties(MediaCaster PROPERTIES INTERFACE_LINK_LIBRARIES "")

